/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2008 INRIA
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
 */
#ifndef NODE_INFO_MANAGER_H
#define NODE_INFO_MANAGER_H

#include "jitter-sim-include.h"
#include <ostream>
#include <string>

namespace ns3 {
namespace eecityu {

using namespace std;

/**
 * \brief Manage and organize information about a node
 */
class NodeInfoManager
{
public:
  NodeInfoManager(void);

  /**
   * \brief Print all net devices of a node
   *
   * \param n The node whose net devices are to be printed
   * \return a string describing all net devices installed on the specified node
   */
  static string PrintAllNetDevices (Ptr<Node> n);

  /**
   * \brief Contain the information regarding a node
   */
  struct NodeInfo
  {
    /**
     * Construct a NodeInfo object
     *
     * \param n The node the information is about
     * \param ndId The net device id
     * \param ifId The interface id corresponding to the net device
     * \param addr The Ipv4 address of the interface
     */
    NodeInfo (Ptr<Node> n, uint32_t ndId, int32_t ifId, Ipv4Address addr);
    /// The node these information is about
    Ptr<Node> node;
    /// The net device id 
    uint32_t netDeviceId;
    /// The interface id
    int32_t interface;
    /// The IPv4 address associated with the interface
    Ipv4Address address;
  };
};

} // namespace eecityu
} // namespace ns3

#endif
